<?php

class Persoon {
    
    
    public static function USERIP() {
        $ip = @$_SERVER['HTTP_CLIENT_IP'];
        if (filter_var($ip,FILTER_VALIDATE_IP)) {
            return $ip;
        }
        else {
            $ip = @$_SERVER['HTTP_X_FORWARDED_FOR'];
            if (filter_var($ip,FILTER_VALIDATE_IP)) {
                return $ip;
            }
            else {
                return $_SERVER['REMOTE_ADDR'];
            }
        }
    }
}
